<?php
require_once dirname(__FILE__)."/../model/user.php";
require_once dirname(__FILE__)."/../model/api.php";


global $_GPC,$_W;
$obj = json_decode( html_entity_decode( $_GPC['obj']),true) ;
$arr=$obj['arr'];




if(!isUser()){
    $url =$this->createMobileUrl('login');
    header("location: $url");
    setJumpUrl();
    die();
}
$user= getUser();

foreach ($arr as $key=>$val){
    $arr[$key]['memberid']=$user['id'];
    $arr[$key]['membername']=$user['name'];
}



$request = postCurl(getServer()."/doCommentRecore",array(
    "data"=>array(
        "list"=>$arr
    ),
));





if($request["ret"]!=0){
    echo json_encode(array('status'=>false,'result'=>$request['msg']),true);
    die();
}else{
    echo json_encode(array('status'=>true,'result'=>"操作成功"),true);
    die();
}
